﻿using System;
using System.Collections.Generic;
using Sportsbook.Domain.Models.BetSlips;
using Sportsbook.Domain.Repositories;
using Sportsbook.InMemoryPersistence.Models.BetSlips;

namespace Sportsbook.InMemoryPersistence.Repositories
{
    public class BetSlipsRepository :  IBetSlipsRepository
    {
        private BetSlip GetBetSlip()
        {
          var betSlip =  new BetSlip
            {
                CreationTime = DateTime.Now,
                Tickets = new List<ITicket>
                {
                    new Ticket
                    {
                        HomeTeam = "Real Madrid",
                        AwayTeam = "Barcelna",
                        ChosenTeam = TeamOption.Home,
                        HomeRedCards = 0,
                        AwayRedCards = 1,
                        Price = 120,
                        Stake = 100
                    }
                }
            };

          return betSlip;
        }

        public IBetSlip Get(string customerId)
        {
            return GetBetSlip();
        }

        public void Save(IBetSlip model, string customerId)
        {
            throw new NotImplementedException();
        }
    }
}